const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    port: 8080,
    host: "localhost",
    //跨域配置
    proxy:{
      //请求地址是/api的话 让服务器代理发送请求 
      "api":{
        target:process.env.VUE_APP_BASE_URL,
        //将地址重写(地址栏) 去除/api
        pathRewrite: {
          '^/api': ''
      }
      }
    }
  },
});
